package com.rm.zeyou.controller;

import cn.dev33.satoken.annotation.SaCheckLogin;
import com.github.pagehelper.PageInfo;
import com.rm.zeyou.entity.Technician;
import com.rm.zeyou.response.ApiRestResponse;
import com.rm.zeyou.service.TechnicianAppraiseService;
import com.rm.zeyou.util.login.TechnicianLoginUtil;
import com.rm.zeyou.vo.request.TechnicianAppraiseListVo;
import com.rm.zeyou.vo.response.TechnicianAppraiseListResponseVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 技师评价表 前端控制器
 * </p>
 *
 * @author YanYang
 * @since 2025-03-12 15:55:09
 */
@Api(tags = "技师评价相关")
@RestController
@RequestMapping("/api/technicianAppraise")
public class TechnicianAppraiseController {
    @Resource
    private TechnicianAppraiseService technicianAppraiseService;
    @Resource
    private TechnicianLoginUtil technicianLoginUtil;

    @ApiOperation(value = "评价列表")
    @PostMapping("technicianAppraiseList")
    @SaCheckLogin(type = "technician")
    public ApiRestResponse<PageInfo<TechnicianAppraiseListResponseVo>> technicianAppraiseList(@RequestBody TechnicianAppraiseListVo requestVo) {
        Technician technician = technicianLoginUtil.getTechnician();
        return technicianAppraiseService.technicianAppraiseList(technician,requestVo);
    }

}
